$zxt.PAGE = "CARD3";	

var tmodel = new zxt.data.TunnelTableModel();
tmodel.method("query", "insert", "update", "remove");

function configCategorySelect(dSelect) {
	dSelect.setOptions( {
		person : "个人",
		company : "公司"
	});
};

function onClick$New(){
	newCard();
};

/* Logic Details */

function newCard(){
	var callback = { 
		onSuccess: function(ei){
		 tmodel.notify( zxt.data.TableModelEvents.NEW, {} );
		},
		onFailure: function(xmlR, status, e){ alert("ERROR"); }
	}; 

	
	var dw = new zxt.data.DataWrapper();	
	dw.addComponent("CardID");	
	dw.addComponent("Name");	
	dw.addComponent("Balance");	
	dw.addComponent("PassWord");	
	dw.addComponent("OwnerType");	
	dw.addComponent("StartYear");	
	dw.addComponent("Integra");	
	$zxt.commit(dw, callback);
	
}	